from faker import Faker
faker=Faker(locale="zh_CN") #中文

def txtRead():
    for i in range(10):
        print(faker.name())

def txtwrite():
    with open("test.txt", "r") as f:
        print(f.readlines())
        lis=f.readlines()
    for i in range(4):
        print(lis[1])
    f.readlines() # 返回所有行，格式是列表形式
    print(f.readline()) #读取一行 默认位置在头
    # while f.readlines()[:-1]:
    #     print(f.readline())

def MakeFakeData():
    data=[
        ("姓名","性别","国家","身份证号","密码"),
        ("宋楷","阴阳","印度","xxxxxxx","54285"),


    ]



if __name__ == '__main__':
    with open("test1.txt", "w") as f:
        f.write(txtRead)